*******************************************************
*** 		Replication of APPENDIX B & C			***
*** "Raising Health Awareness in Rural Communities" ***
*** by Siddique, Rahman, Pakrashi, Islam, Ahmed		***
*******************************************************


*****************************
* APPENDIX FIGURES & TABLES *
*****************************


***************************************************************************************************
*FIGURES B1 and B2
/*
These two figues are maps of our study regions and do not require any replication codes.
*/
***************************************************************************************************


***************************************************************************************************
*FIGURE B3: Summary of awareness, by indicators

//BANGLADESH
//Import the following data: cibar_figure_dataset_bd.dta. This data file is in the folder "3. Figures B3-B4".

cibar question, over1(choice) over2(treat) graphopts(title("Bangladesh") subtitle("Awareness on Individual Aspects") ytitle("Proportion") yscale(range(0 1)) ylabel(0(0.2)1) legend(col(1))) 

clear

//INDIA
//Import the following data: cibar_figure_dataset_ind.dta. This data file is in the folder "3. Figures B3-B4".

cibar question, over1(choice) over2(d_grp1) graphopts(title("India") subtitle("Awareness on Individual Aspects") ytitle("Proportion") yscale(range(0 1)) ylabel(0(0.2)1) legend(col(1))) 

clear
***************************************************************************************************


***************************************************************************************************
*FIGURE B4: Summary of compliance, by indicators


//BANGLADESH
//Import the following data: practice_figure_dataset_bd.dta. This data file is in the folder "3. Figures B3-B4".

cibar outcome, over1(practice) over2(treat) graphopts(subtitle("A: Bangladesh") ytitle("Proportion") yscale(range(0 1)) ylabel(0(0.2)1) legend(symxsize(4) keygap(1))) 

clear

//INDIA
//Import the following data: practice_figure_dataset_ind.dta. This data file is in the folder "3. Figures B3-B4".

cibar outcome2, over1(practice) over2(treat) graphopts(subtitle("B: India") ytitle("Proportion") yscale(range(0 1)) ylabel(0(0.2)1) legend(symxsize(4) keygap(1))) 

clear
***************************************************************************************************


***************************************************************************************************
*FIGURE B5: Compliance distribution showing treatment effects

//BANGLADESH
//Import the following data: Data_Covid_BD_wave_1.dta
twoway (kdensity comply if treat==1, bwidth(0.5) xlabel(0(0.25)1) clpattern(dash) clc(black)) ///
(kdensity comply if treat==2, bwidth(0.5) xlabel(0(0.25)1) clpattern(solid) clc(black)) ///
(kdensity comply if treat==3, bwidth(0.5) xlabel(0(0.25)1) clpattern(longdash) clc(black)), ///
ytitle("Density") xtitle("Compliance") title("A: Bangladesh") graphregion(color(white)) legend( order(1 2 3) label(1 "SMS only") label(2 "Call only") label(3 "SMS & Call both")) saving(comp_bd, replace)

clear 

//INDIA
//Import the following data: Data_Covid_India.dta
twoway (kdensity comply if treat==1, bwidth(0.5) xlabel(0(0.25)1) clpattern(dash) clc(black)) ///
(kdensity comply if treat==2, bwidth(0.5) xlabel(0(0.25)1) clpattern(solid) clc(black)) ///
(kdensity comply if treat==3, bwidth(0.5) xlabel(0(0.25)1) clpattern(longdash) clc(black)), ///
ytitle("Density") xtitle("Compliance") title("B: India") graphregion(color(white)) legend( order(1 2 3) label(1 "SMS only") label(2 "Call only") label(3 "SMS & Call both")) saving(comp_ind, replace)

graph combine comp_bd.gph comp_ind.gph, col(1) xsize(3) saving(comply, replace)

clear 
***************************************************************************************************


***************************************************************************************************
*TABLE B1: Initial treatment assignment and endline survey
** Panel A [Bangladesh]
//Import the following data: Data_attrition_BD.dta

tab treated if treat==1 //T1: Text only
tab attrit if treat==1

tab treated if treat==2 //T2: Call only
tab attrit if treat==2

tab treated if treat==3 //T3: Both
tab attrit if treat==3

tab treated //Total
tab attrit

clear


** Panel B [India]
//Import the follwing data: Data_attrition_India.dta

tab treated if treat_a==1 //T1: Text only
tab attrition if treat_a==1

tab treated if treat_a==2 //T2: Call only
tab attrition if treat_a==2

tab treated if treat_a==3 //T3: Both
tab attrition if treat_a==3

tab treated //Total
tab attrition

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B2: Bangladesh: representativeness of our study sample

** A & B: Bangladeshi rural & Khulna Division
//Import the follwing data: HIES_File1_HH_demographics.dta
summ age yr_edu hhsize gender religion if ruc==1  //for A: Bangladeshi Rural
summ age yr_edu hhsize gender religion if id_01_code==40 //for B: Khulna Division

//For "Monthly income", please do the following:
//Import the follwing data: HIES_File3_HH_Income.dta
summ total_income if ruc==1 //for A: Bangladeshi Rural
summ total_income if id_01_code==40 //for B: Khulna Division

//For "Works in agriculture", please do the following:
//Import the follwing data: HIES_File2_HH_Occupation.dta
summ agriculture if ruc==1  //for A: Bangladeshi Rural
summ agriculture if id_01_code==40 //for B: Khulna Division

** C: Our study sample
//Import the follwing data: Data_Covid_BD_wave_1.dta
summ age_respondent edu_respondent nmember Gender_res rel_islam Monthly_income farmer1

***************************************************************************************************


***************************************************************************************************
*TABLE B3: India: representativeness of our study sample
/* Panel A of this table was created using statistics reported in the "NSS 68th Round". The link to this givernment report
is given in the appendix. 
*/

//Panel B: 
//Import data file: Data_Covid_India.dta
summ age male hindu urban college bpl caste_c1

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B4
/*
This is a table with the list of our control variables and does not require a replication code.
*/
***************************************************************************************************


***************************************************************************************************
*TABLE B5: Balance check: treated versus untreated (Bangladeshi sample)
//Import data file: Data_attrition_BD.dta

//Generate dummy for those who received the treatment
gen gottreat=1 if (treated==1|treated==3)
replace gottreat=0 if gottreat==.
label variable gottreat "=1 if got treated and 0 otherwise"

//Generate interactions (needed for Tables B5, B7, B8, B10)
gen age_T2=age*treat2
gen age_T3=age*treat3
gen edu_T2= edu*treat2
gen edu_T3= edu*treat3
gen income_T2= log_income*treat2
gen income_T3= log_income*treat3
gen nmember_T2= nmember*treat2
gen nmember_T3= nmember*treat3
gen gender_T2= gender*treat2
gen gender_T3= gender*treat3
gen religion_T2= religion*treat2
gen religion_T3= religion*treat3
gen professional_T2= professional*treat2
gen professional_T3= professional*treat3
gen farmer_T2= farmer*treat2
gen farmer_T3= farmer*treat3
gen laborer_T2= laborer*treat2
gen laborer_T3= laborer*treat3
gen selfemployed_T2= selfemployed*treat2
gen selfemployed_T3= selfemployed*treat3


//Chi-squared tests reported in the paper (section 2.2)
tab gottreat treat1 if treat!=3, chi2  //T1 vs T2
tab gottreat treat1 if treat!=2, chi2  //T1 vs T3
tab gottreat treat2 if treat!=1, chi2  //T2 vs T3


//Column 1
reg gottreat age edu log_income nmember gender religion farmer laborer selfemployed if treat==1, vce(cluster VILLAGE_ID) //T1, column 1
outreg2 using attrit1.tex, append ctitle(1) dec(3) 

//joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 2
reg gottreat age edu log_income nmember gender religion farmer laborer selfemployed if treat==2, vce(cluster VILLAGE_ID) //T2, column 2
outreg2 using attrit1.tex, append ctitle(2) dec(3) 

//joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 3
reg gottreat age edu log_income nmember gender religion farmer laborer selfemployed if treat==3, vce(cluster VILLAGE_ID) //T3, column 3
outreg2 using attrit1.tex, append ctitle(3) dec(3) 

//joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 4
reg gottreat treat2 age age_T2 edu edu_T2 log_income income_T2 nmember nmember_T2 gender gender_T2 religion religion_T2 farmer farmer_T2 laborer laborer_T2 selfemployed selfemployed_T2 if treat!=3, vce(cluster VILLAGE_ID) //T1 vs T2, column 4
outreg2 using attrit1.tex, append ctitle(4) dec(3) 

//joint F-tests
test age_T2 edu_T2 income_T2 nmember_T2 gender_T2 religion_T2 farmer_T2 laborer_T2 selfemployed_T2 


//Column 5
reg gottreat treat2 age age_T2 edu edu_T2 log_income income_T2 nmember nmember_T2 gender gender_T2 religion religion_T2 farmer farmer_T2 laborer laborer_T2 selfemployed selfemployed_T2  if treat!=1, vce(cluster VILLAGE_ID) //T2 vs T3, column 5
outreg2 using attrit1.tex, append ctitle(5) dec(3) 

//joint F-tests
test age_T2 edu_T2 income_T2 nmember_T2 gender_T2 religion_T2 farmer_T2 laborer_T2 selfemployed_T2 


//Column 6
reg gottreat treat3 age age_T3 edu edu_T3 log_income income_T3 nmember nmember_T3 gender gender_T3 religion religion_T3 farmer farmer_T3 laborer laborer_T3 selfemployed selfemployed_T3 if treat!=2, vce(cluster VILLAGE_ID) //T1 vs T3, column 6
outreg2 using attrit1.tex, append ctitle(6) dec(3) 

//joint F-tests
test age_T3 edu_T3 income_T3 nmember_T3 gender_T3 religion_T3 farmer_T3 laborer_T3 selfemployed_T3

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B6: Balance check: treated versus untreated (Indian sample)
//Import data file: Data_attrition_India.dta

*Generate dummy for whether participant receievd treatment or not
gen gottreat=1 if (treated==1|treated==3)
replace gottreat=0 if gottreat==.
label variable gottreat "=1 if got treated and 0 otherwise"

*Generate treatment groups that also includes 190 that were not surveyed
gen treat1=1 if treat_a==1
replace treat1=0 if treat1==.
label variable treat1 "Text only"

gen treat2=1 if treat_a==2
replace treat2=0 if treat2==.
label variable treat2 "Call only"

gen treat3=1 if treat_a==3
replace treat3=0 if treat3==.
label variable treat3 "Both text and call"

//Generate interactions
gen age_T2=age*treat2
gen college_T2=college*treat2
gen male_T2=male*treat2
gen urban_T2=urban*treat2
gen income_T2=income*treat2
gen joint_T2=joint*treat2 
gen own_house_T2=own_house*treat2 
gen disability_T2=disability*treat2 
gen married_T2=married*treat2 
gen employment_T2=employment*treat2 
gen long_term_T2=long_term*treat2 
gen hindu_T2=hindu*treat2 
gen caste_c1_T2=caste_c1*treat2 

gen age_T3=age*treat3
gen college_T3=college*treat3
gen male_T3=male*treat3
gen urban_T3=urban*treat3
gen income_T3=income*treat3
gen joint_T3=joint*treat3 
gen own_house_T3=own_house*treat3 
gen disability_T3=disability*treat3 
gen married_T3=married*treat3 
gen employment_T3=employment*treat3 
gen long_term_T3=long_term*treat3 
gen hindu_T3=hindu*treat3 
gen caste_c1_T3=caste_c1*treat3

//Chi-squared tests reported in the paper (section 2.2)
tab gottreat treat1 if treat_a!=3, chi2  //T1 vs T2
tab gottreat treat1 if treat_a!=2, chi2  //T1 vs T3
tab gottreat treat2 if treat_a!=1, chi2  //T2 vs T3

//Column 1
reg gottreat age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat_a==1,vce(cluster location) //T1
outreg2 using attrit1.tex, append ctitle(1) dec(3) 

//Joint F-test 
test age college male urban income joint own_house disability married employment long_term hindu caste_c1 


//Column 2
reg gottreat age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat_a==2,vce(cluster location) //T1
outreg2 using attrit1.tex, append ctitle(2) dec(3) 

//Joint F-test 
test age college male urban income joint own_house disability married employment long_term hindu caste_c1 


//Column 3
reg gottreat age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat_a==3,vce(cluster location) //T1
outreg2 using attrit1.tex, append ctitle(3) dec(3) 

//Joint F-test 
test age college male urban income joint own_house disability married employment long_term hindu caste_c1 


//Column 4
reg gottreat treat2 age age_T2 college college_T2 male male_T2 urban urban_T2 income income_T2 joint joint_T2 own_house own_house_T2 disability disability_T2 married married_T2 employment employment_T2 long_term long_term_T2 hindu hindu_T2 caste_c1 caste_c1_T2 if treat_a!=3, vce(cluster location) //T1 vs T2
outreg2 using attrit1.tex, append ctitle(4) dec(3) 

//Joint F-test 
test age_T2 college_T2 male_T2 urban_T2 income_T2 joint_T2 own_house_T2 disability_T2 married_T2 employment_T2 long_term_T2 hindu_T2 caste_c1_T2 


//Column 5
reg gottreat treat2 age age_T2 college college_T2 male male_T2 urban urban_T2 income income_T2 joint joint_T2 own_house own_house_T2 disability disability_T2 married married_T2 employment employment_T2 long_term long_term_T2 hindu hindu_T2 caste_c1 caste_c1_T2 if treat_a!=1, vce(cluster location) //T2 vs T3
outreg2 using attrit1.tex, append ctitle(5) dec(3) 

//Joint F-test 
test age_T2 college_T2 male_T2 urban_T2 income_T2 joint_T2 own_house_T2 disability_T2 married_T2 employment_T2 long_term_T2 hindu_T2 caste_c1_T2 


//Column 6
reg gottreat treat3 age age_T3 college college_T3 male male_T3 urban urban_T3 income income_T3 joint joint_T3 own_house own_house_T3 disability disability_T3 married married_T3 employment employment_T3 long_term long_term_T3 hindu hindu_T3 caste_c1 caste_c1_T3 if treat_a!=2, vce(cluster location) //T1 vs T3
outreg2 using attrit1.tex, append ctitle(6) dec(3) 

//Joint F-test 
test age_T3 college_T3 male_T3 urban_T3 income_T3 joint_T3 own_house_T3 disability_T3 married_T3 employment_T3 long_term_T3 hindu_T3 caste_c1_T3


clear
***************************************************************************************************


***************************************************************************************************
*TABLE B7: Balance check among the untreated: surveyed versus not surveyed at endline (Bangladeshi sample)
//Import data file: Data_attrition_BD.dta

//Generate dummy
gen untreat_survey = 1 if treated==0
replace untreat_survey = 0 if treated==2
label variable untreat_survey "=1 if untreated were surveyed and 0 if untreated were not surveyed"

//Generate interactions
gen age_T2=age*treat2
gen age_T3=age*treat3
gen edu_T2= edu*treat2
gen edu_T3= edu*treat3
gen income_T2= log_income*treat2
gen income_T3= log_income*treat3
gen nmember_T2= nmember*treat2
gen nmember_T3= nmember*treat3
gen gender_T2= gender*treat2
gen gender_T3= gender*treat3
gen religion_T2= religion*treat2
gen religion_T3= religion*treat3
gen professional_T2= professional*treat2
gen professional_T3= professional*treat3
gen farmer_T2= farmer*treat2
gen farmer_T3= farmer*treat3
gen laborer_T2= laborer*treat2
gen laborer_T3= laborer*treat3
gen selfemployed_T2= selfemployed*treat2
gen selfemployed_T3= selfemployed*treat3

//Chi-squared tests reported in the paper (section 2.2)
tab untreat_survey treat1 if treat!=3, chi2  //T1 vs T2
tab untreat_survey treat1 if treat!=2, chi2  //T1 vs T3
tab untreat_survey treat2 if treat!=1, chi2  //T2 vs T3

//Column 1
reg untreat_survey age edu log_income nmember gender religion farmer laborer selfemployed if treat==1, vce(cluster VILLAGE_ID) //T1
outreg2 using attrit2.tex, append ctitle(1) dec(3)

//Joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 2
reg untreat_survey age edu log_income nmember gender religion farmer laborer selfemployed if treat==2, vce(cluster VILLAGE_ID) //T2
outreg2 using attrit2.tex, append ctitle(2) dec(3) 

//Joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 3
reg untreat_survey age edu log_income nmember gender religion farmer laborer selfemployed if treat==3, vce(cluster VILLAGE_ID) //T3
outreg2 using attrit2.tex, append ctitle(3) dec(3) 

//Joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 4
reg untreat_survey treat2 age age_T2 edu edu_T2 log_income income_T2 nmember nmember_T2 gender gender_T2 religion religion_T2 farmer farmer_T2 laborer laborer_T2 selfemployed selfemployed_T2 if treat!=3, vce(cluster VILLAGE_ID) //T1 vs T2
outreg2 using attrit2.tex, append ctitle(4) dec(3) 

//Joint F-test
test age_T2 edu_T2 income_T2 nmember_T2 gender_T2 religion_T2 farmer_T2 laborer_T2 selfemployed_T2 


//Column 5
reg untreat_survey treat2 age age_T2 edu edu_T2 log_income income_T2 nmember nmember_T2 gender gender_T2 religion religion_T2 farmer farmer_T2 laborer laborer_T2 selfemployed selfemployed_T2  if treat!=1, vce(cluster VILLAGE_ID) //T2 vs T3
outreg2 using attrit2.tex, append ctitle(5) dec(3) 

//Joint F-test
test age_T2 edu_T2 income_T2 nmember_T2 gender_T2 religion_T2 farmer_T2 laborer_T2 selfemployed_T2 


//Column 6
reg untreat_survey treat3 age age_T3 edu edu_T3 log_income income_T3 nmember nmember_T3 gender gender_T3 religion religion_T3 farmer farmer_T3 laborer laborer_T3 selfemployed selfemployed_T3 if treat!=2, vce(cluster VILLAGE_ID) //T1 vs T3
outreg2 using attrit2.tex, append ctitle(6) dec(3) 

//Joint F-test
test age_T3 edu_T3 income_T3 nmember_T3 gender_T3 religion_T3 farmer_T3 laborer_T3 selfemployed_T3

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B8: Balance check: surveyed versus not surveyed at endline (Bangladeshi sample)
//Import data file: Data_attrition_BD.dta

//Generate dummy 
gen surveyed = 1 if (treated==0|treated==1)
replace surveyed = 0 if surveyed==.
label variable surveyed "=1 if surveyed at endline and 0 if not"

//Generate interactions
gen age_T2=age*treat2
gen age_T3=age*treat3
gen edu_T2= edu*treat2
gen edu_T3= edu*treat3
gen income_T2= log_income*treat2
gen income_T3= log_income*treat3
gen nmember_T2= nmember*treat2
gen nmember_T3= nmember*treat3
gen gender_T2= gender*treat2
gen gender_T3= gender*treat3
gen religion_T2= religion*treat2
gen religion_T3= religion*treat3
gen professional_T2= professional*treat2
gen professional_T3= professional*treat3
gen farmer_T2= farmer*treat2
gen farmer_T3= farmer*treat3
gen laborer_T2= laborer*treat2
gen laborer_T3= laborer*treat3
gen selfemployed_T2= selfemployed*treat2
gen selfemployed_T3= selfemployed*treat3

//Chi-squared tests reported in the paper (section 2.2)
tab surveyed treat1 if treat!=3, chi2  //T1 vs T2
tab surveyed treat1 if treat!=2, chi2  //T1 vs T3
tab surveyed treat2 if treat!=1, chi2  //T2 vs T3


//Column 1
reg surveyed age edu log_income nmember gender religion farmer laborer selfemployed if treat==1, vce(cluster VILLAGE_ID) //T1
outreg2 using attrit3.tex, append ctitle(1) dec(3) 

//Joint F-tests
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 2
reg surveyed age edu log_income nmember gender religion farmer laborer selfemployed if treat==2, vce(cluster VILLAGE_ID) //T2
outreg2 using attrit3.tex, append ctitle(2) dec(3) 

//Joint F-tests
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 3
reg surveyed age edu log_income nmember gender religion farmer laborer selfemployed if treat==3, vce(cluster VILLAGE_ID) //T3
outreg2 using attrit3.tex, append ctitle(3) dec(3) 

//Joint F-tests
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 4
reg surveyed treat2 age age_T2 edu edu_T2 log_income income_T2 nmember nmember_T2 gender gender_T2 religion religion_T2 farmer farmer_T2 laborer laborer_T2 selfemployed selfemployed_T2 if treat!=3, vce(cluster VILLAGE_ID) //T1 vs T2
outreg2 using attrit3.tex, append ctitle(4) dec(3) 

//Joint F-tests
test age_T2 edu_T2 income_T2 nmember_T2 gender_T2 religion_T2 farmer_T2 laborer_T2 selfemployed_T2 


//Column 5
reg surveyed treat2 age age_T2 edu edu_T2 log_income income_T2 nmember nmember_T2 gender gender_T2 religion religion_T2 farmer farmer_T2 laborer laborer_T2 selfemployed selfemployed_T2  if treat!=1, vce(cluster VILLAGE_ID) //T2 vs T3
outreg2 using attrit3.tex, append ctitle(5) dec(3) 

//Joint F-tests
test age_T2 edu_T2 income_T2 nmember_T2 gender_T2 religion_T2 farmer_T2 laborer_T2 selfemployed_T2 


//Column 6
reg surveyed treat3 age age_T3 edu edu_T3 log_income income_T3 nmember nmember_T3 gender gender_T3 religion religion_T3 farmer farmer_T3 laborer laborer_T3 selfemployed selfemployed_T3 if treat!=2, vce(cluster VILLAGE_ID) //T1 vs T3
outreg2 using attrit3.tex, append ctitle(6) dec(3) 

//Joint F-tests
test age_T3 edu_T3 income_T3 nmember_T3 gender_T3 religion_T3 farmer_T3 laborer_T3 selfemployed_T3

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B9: Balance check: surveyed versus not surveyed at endline (Indian sample)
//Import data file: Data_attrition_India.dta

//Generate dummy
gen surveyed = 1 if treated==1
replace surveyed = 0 if surveyed==.
label variable surveyed "=1 if surveyed at endline and 0 if not"

*Generate treatment groups that also includes 190 that were not surveyed
gen treat1=1 if treat_a==1
replace treat1=0 if treat1==.
label variable treat1 "Text only"

gen treat2=1 if treat_a==2
replace treat2=0 if treat2==.
label variable treat2 "Call only"

gen treat3=1 if treat_a==3
replace treat3=0 if treat3==.
label variable treat3 "Both text and call"

//Generate interactions
gen age_T2=age*treat2
gen college_T2=college*treat2
gen male_T2=male*treat2
gen urban_T2=urban*treat2
gen income_T2=income*treat2
gen joint_T2=joint*treat2 
gen own_house_T2=own_house*treat2 
gen disability_T2=disability*treat2 
gen married_T2=married*treat2 
gen employment_T2=employment*treat2 
gen long_term_T2=long_term*treat2 
gen hindu_T2=hindu*treat2 
gen caste_c1_T2=caste_c1*treat2 

gen age_T3=age*treat3
gen college_T3=college*treat3
gen male_T3=male*treat3
gen urban_T3=urban*treat3
gen income_T3=income*treat3
gen joint_T3=joint*treat3 
gen own_house_T3=own_house*treat3 
gen disability_T3=disability*treat3 
gen married_T3=married*treat3 
gen employment_T3=employment*treat3 
gen long_term_T3=long_term*treat3 
gen hindu_T3=hindu*treat3 
gen caste_c1_T3=caste_c1*treat3

//Chi-squared tests reported in the paper (section 2.2)
tab surveyed treat1 if treat_a!=3, chi2  //T1 vs T2
tab surveyed treat1 if treat_a!=2, chi2  //T1 vs T3
tab surveyed treat2 if treat_a!=1, chi2  //T2 vs T3

//Column 1
reg surveyed age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat_a==1,vce(cluster location) //T1
outreg2 using attrit3.tex, append ctitle(1) dec(3) 

//Joint F-tests
test age college male urban income joint own_house disability married employment long_term hindu caste_c1 


//Column 2
reg surveyed age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat_a==2,vce(cluster location) //T1
outreg2 using attrit3.tex, append ctitle(2) dec(3) 

//Joint F-tests
test age college male urban income joint own_house disability married employment long_term hindu caste_c1 


//Column 3
reg surveyed age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat_a==3,vce(cluster location) //T1
outreg2 using attrit3.tex, append ctitle(3) dec(3) 

//Joint F-tests
test age college male urban income joint own_house disability married employment long_term hindu caste_c1 


//Column 4
reg surveyed treat2 age age_T2 college college_T2 male male_T2 urban urban_T2 income income_T2 joint joint_T2 own_house own_house_T2 disability disability_T2 married married_T2 employment employment_T2 long_term long_term_T2 hindu hindu_T2 caste_c1 caste_c1_T2 if treat_a!=3, vce(cluster location) //T1 vs T2
outreg2 using attrit3.tex, append ctitle(4) dec(3) 

//Joint F-tests
test age_T2 college_T2 male_T2 urban_T2 income_T2 joint_T2 own_house_T2 disability_T2 married_T2 employment_T2 long_term_T2 hindu_T2 caste_c1_T2 


//Column 5
reg surveyed treat2 age age_T2 college college_T2 male male_T2 urban urban_T2 income income_T2 joint joint_T2 own_house own_house_T2 disability disability_T2 married married_T2 employment employment_T2 long_term long_term_T2 hindu hindu_T2 caste_c1 caste_c1_T2 if treat_a!=1, vce(cluster location) //T2 vs T3
outreg2 using attrit3.tex, append ctitle(5) dec(3) 

//Joint F-tests
test age_T2 college_T2 male_T2 urban_T2 income_T2 joint_T2 own_house_T2 disability_T2 married_T2 employment_T2 long_term_T2 hindu_T2 caste_c1_T2 


//Column 6
reg surveyed treat3 age age_T3 college college_T3 male male_T3 urban urban_T3 income income_T3 joint joint_T3 own_house own_house_T3 disability disability_T3 married married_T3 employment employment_T3 long_term long_term_T3 hindu hindu_T3 caste_c1 caste_c1_T3 if treat_a!=2, vce(cluster location) //T1 vs T3
outreg2 using attrit3.tex, append ctitle(6) dec(3) 

//Joint F-tests
test age_T3 college_T3 male_T3 urban_T3 income_T3 joint_T3 own_house_T3 disability_T3 married_T3 employment_T3 long_term_T3 hindu_T3 caste_c1_T3


clear
***************************************************************************************************


***************************************************************************************************
*TABLE B10: Balance check: attrited versus not attrited (Bangladeshi sample)
//Import data file: Data_attrition_BD.dta

//Generate interactions
gen age_T2=age*treat2
gen age_T3=age*treat3
gen edu_T2= edu*treat2
gen edu_T3= edu*treat3
gen income_T2= log_income*treat2
gen income_T3= log_income*treat3
gen nmember_T2= nmember*treat2
gen nmember_T3= nmember*treat3
gen gender_T2= gender*treat2
gen gender_T3= gender*treat3
gen religion_T2= religion*treat2
gen religion_T3= religion*treat3
gen professional_T2= professional*treat2
gen professional_T3= professional*treat3
gen farmer_T2= farmer*treat2
gen farmer_T3= farmer*treat3
gen laborer_T2= laborer*treat2
gen laborer_T3= laborer*treat3
gen selfemployed_T2= selfemployed*treat2
gen selfemployed_T3= selfemployed*treat3

//Chi-squared tests reported in the paper (section 2.2)
tab attrit treat1 if treat!=3, chi2  //T1 vs T2
tab attrit treat1 if treat!=2, chi2  //T1 vs T3
tab attrit treat2 if treat!=1, chi2  //T2 vs T3

//Column 1
reg attrit age edu log_income nmember gender religion farmer laborer selfemployed if treat==1, vce(cluster VILLAGE_ID) //T1
outreg2 using attrit4.tex, append ctitle(1) dec(3) 

//Joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 2
reg attrit age edu log_income nmember gender religion farmer laborer selfemployed if treat==2, vce(cluster VILLAGE_ID) //T2
outreg2 using attrit4.tex, append ctitle(2) dec(3) 

//Joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 3
reg attrit age edu log_income nmember gender religion farmer laborer selfemployed if treat==3, vce(cluster VILLAGE_ID) //T3
outreg2 using attrit4.tex, append ctitle(3) dec(3) 

//Joint F-test
test age edu log_income nmember gender religion farmer laborer selfemployed


//Column 4
reg attrit treat2 age age_T2 edu edu_T2 log_income income_T2 nmember nmember_T2 gender gender_T2 religion religion_T2 farmer farmer_T2 laborer laborer_T2 selfemployed selfemployed_T2 if treat!=3, vce(cluster VILLAGE_ID) //T1 vs T2
outreg2 using attrit4.tex, append ctitle(4) dec(3) 

//Joint F-test
test age_T2 edu_T2 income_T2 nmember_T2 gender_T2 religion_T2 farmer_T2 laborer_T2 selfemployed_T2 


//Column 5
reg attrit treat2 age age_T2 edu edu_T2 log_income income_T2 nmember nmember_T2 gender gender_T2 religion religion_T2 farmer farmer_T2 laborer laborer_T2 selfemployed selfemployed_T2  if treat!=1, vce(cluster VILLAGE_ID) //T2 vs T3
outreg2 using attrit4.tex, append ctitle(5) dec(3) 

//Joint F-test
test age_T2 edu_T2 income_T2 nmember_T2 gender_T2 religion_T2 farmer_T2 laborer_T2 selfemployed_T2 


//Column 6
reg attrit treat3 age age_T3 edu edu_T3 log_income income_T3 nmember nmember_T3 gender gender_T3 religion religion_T3 farmer farmer_T3 laborer laborer_T3 selfemployed selfemployed_T3 if treat!=2, vce(cluster VILLAGE_ID) //T1 vs T3
outreg2 using attrit4.tex, append ctitle(6) dec(3) 

//Joint F-test
test age_T3 edu_T3 income_T3 nmember_T3 gender_T3 religion_T3 farmer_T3 laborer_T3 selfemployed_T3

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B11: Effects on health awareness: alternative models

//PANEL A: BANGLADESH
//Import data file: Data_Covid_BD_wave_1.dta
oprobit tot_ans treat2 treat3 i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg1101.tex, append ctitle(1) dec(3) keep(treat2 treat3)

oprobit tot_ans treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg1101.tex, append ctitle(2)  dec(3) keep(treat2 treat3)

oprobit tot_ans treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg1101.tex, append ctitle(3)  dec(3) keep(treat2 treat3) 

probit all_ans treat2 treat3 i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg1101.tex, append ctitle(4) dec(3) keep(treat2 treat3) 

probit all_ans treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg1101.tex, append ctitle(5)  dec(3) keep(treat2 treat3) 

probit all_ans treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg1101.tex, append ctitle(6)  dec(3) keep(treat2 treat3) 

clear

//PANEL B: INDIA
//Import data file: Data_Covid_India.dta
oprobit total_ans treat2 treat3 i.location, vce(cluster location)
outreg2 using reg11.tex, append ctitle(1) dec(3) keep(treat2 treat3)

oprobit total_ans treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed i.location, vce(cluster location)
outreg2 using reg11.tex, append ctitle(2) dec(3) keep(treat2 treat3)

oprobit total_ans treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg11.tex, append ctitle(3) dec(3) keep(treat2 treat3)

probit all_ans treat2 treat3 i.location, vce(cluster location) 
outreg2 using reg11.tex, append ctitle(4) dec(3) keep(treat2 treat3)

probit all_ans treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed i.location, vce(cluster location) 
outreg2 using reg11.tex, append ctitle(5) dec(3) keep(treat2 treat3)

probit all_ans treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg11.tex, append ctitle(6) dec(3) keep(treat2 treat3)

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B12: Effect on health awareness using indicators

//PANEL A: BANGLADESH (with all controls)
//Import data file: Data_Covid_BD_wave_1.dta

//Column 1
reg Q1_1_1_wash treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg201.tex, append ctitle(1)  dec(3) keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3

//Column 2
reg Q1_1_2_Cover_mouth treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg201.tex, append ctitle(2)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 3
reg Q1_1_3_distance treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg201.tex, append ctitle(3)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 4
reg Q1_1_4_handshake treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg201.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 5
reg Q1_1_5_healthy treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg201.tex, append ctitle(5)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//T1 mean and SD:
summ Q1_1_1_wash Q1_1_2_Cover_mouth Q1_1_3_distance Q1_1_4_handshake Q1_1_5_healthy if (treat1==1 & age_respondent!=.) //We used the condition "age_respondent!=." because "age" variable is only available for 90% of the sample


//PANEL B: BANGLADESH (without 'old' controls)
//Import data file: Data_Covid_BD_wave_1.dta

//Column 1
reg Q1_1_1_wash treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg202.tex, append ctitle(1)  dec(3) keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3

//Column 2
reg Q1_1_2_Cover_mouth treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg202.tex, append ctitle(2)  dec(3) keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3

//Column 3
reg Q1_1_3_distance treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg202.tex, append ctitle(3)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 4
reg Q1_1_4_handshake treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg202.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 5
reg Q1_1_5_healthy treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg202.tex, append ctitle(5)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//T1 mean and SD:
summ Q1_1_1_wash Q1_1_2_Cover_mouth Q1_1_3_distance Q1_1_4_handshake Q1_1_5_healthy if treat1==1 

clear


//PANEL C: INDIA 
//Import data file: Data_Covid_India.dta

//Column 1
reg wash_hands treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg203.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 2
reg sneezing treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg203.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 3
reg distance treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg203.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 4
reg physical_contact treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg203.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 5
reg healthy treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg203.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//T1 mean and SD:
summ wash_hands sneezing distance physical_contact healthy if treat==1

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B13:  Effects on compliance indicators

//PANEL A: BANGLADESH
//Import data file: Data_Covid_BD_wave_1.dta

//Column 1
reg market2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg301.tex, append ctitle(1)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 2
reg doctor2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg301.tex, append ctitle(2)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 3
reg entertainment2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg301.tex, append ctitle(3)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 4
reg religious2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg301.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 5
reg wash2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg301.tex, append ctitle(5)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 6
reg avoid_physical2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg301.tex, append ctitle(6)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//T1 mean and SD:
summ market2 doctor2 entertainment2 religious2 wash2 avoid_physical2 if treat1==1

//Westfall-Young FWER p-values
wyoung market2 doctor2 entertainment2 religious2 wash2 avoid_physical2, cmd(reg OUTCOMEVAR treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) familyp(treat2 treat3) cluster(VILLAGE_ID) bootstrap(1000) seed(1234)

//Rnadomization Inference p-values
randcmd ((treat2 treat3) reg market2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg doctor2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg entertainment2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg religious2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg wash2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg avoid_physical2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)), treatvars(treat2 treat3) seed(1234) reps(1000)

clear
***************************************************************************************************


***************************************************************************************************
//PANEL B: INDIA
//Import data file: Data_Covid_India.dta

//Column 1
reg market3 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg302.tex, append ctitle(1) dec(3)  keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3
//CGM p-values
boottest treat2, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)
boottest treat3, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)

//Column 2
reg doctor3 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg302.tex, append ctitle(2) dec(3)  keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3
//CGM p-values
boottest treat2, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)
boottest treat3, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)

//Column 3
reg entertainment2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg302.tex, append ctitle(3) dec(3)  keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3
//CGM p-values
boottest treat2, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)
boottest treat3, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)

//Column 4
reg religious2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg302.tex, append ctitle(4) dec(3)  keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3
//CGM p-values
boottest treat2, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)
boottest treat3, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)

//Column 5
reg wash_practice2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg302.tex, append ctitle(5) dec(3)  keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3
//CGM p-values
boottest treat2, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)
boottest treat3, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)

//Column 6
reg hands_practice2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg302.tex, append ctitle(6) dec(3)  keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3
//CGM p-values
boottest treat2, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)
boottest treat3, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)


//T1 mean and SD:
summ market3 doctor3 entertainment2 religious2 wash_practice2 hands_practice2 if treat==1

//Westfall-Young p-values
wyoung market3 doctor3 entertainment2 religious2 wash_practice2 hands_practice2, cmd(reg OUTCOMEVAR treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)) familyp(treat2 treat3) cluster(location) bootstrap(1000) seed(1234) //force

//Randomization Inference p-values
randcmd ((treat2 treat3) reg market3 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)) ((treat2 treat3) reg doctor3 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)) ((treat2 treat3) reg entertainment2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)) ((treat2 treat3) reg religious2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)) ((treat2 treat3) reg wash_practice2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)) ((treat2 treat3) reg hands_practice2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)), treatvars(treat2 treat3) seed(1234) reps(1000)

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B14:  Effects on compliance indicators in Bangladesh (with all controls)
//Import data file: Data_Covid_BD_wave_1.dta

//Column 1
reg market2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg303.tex, append ctitle(1)  dec(3) keep(treat2 treat3)
//p-value (T2-T3)
test treat2=treat3

//Column 2
reg doctor2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg303.tex, append ctitle(2)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 3
reg entertainment2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg303.tex, append ctitle(3)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 4
reg religious2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg303.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 5
reg wash2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg303.tex, append ctitle(5)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3

//Column 6
reg avoid_physical2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg303.tex, append ctitle(6)  dec(3) keep(treat2 treat3) 
//p-value (T2-T3)
test treat2=treat3


//T1 mean and SD:
summ market2 doctor2 entertainment2 religious2 wash2 avoid_physical2 if (treat1==1 & age_respondent!=.) //We used the condition "age_respondent!=." because "age" variable is only available for 90% of the sample

//Westfall-Young FWER p-values
wyoung market2 doctor2 entertainment2 religious2 wash2 avoid_physical2, cmd(reg OUTCOMEVAR treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) familyp(treat2 treat3) cluster(VILLAGE_ID) bootstrap(1000) seed(1234) //force

//Randomization Inference p-values
randcmd ((treat2 treat3) reg market2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg doctor2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg entertainment2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg religious2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg wash2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg avoid_physical2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)), treatvars(treat2 treat3) seed(1234) reps(1000)

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B15: Effects on compliance indicators: probit estimates

//Panel A: BANGLADESH (with all controls)
//Import data file: Data_Covid_BD_wave_1.dta

probit market2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg401.tex, append ctitle(1)  dec(3) keep(treat2 treat3)

probit doctor2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg401.tex, append ctitle(2)  dec(3) keep(treat2 treat3) 

probit entertainment2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg401.tex, append ctitle(3)  dec(3) keep(treat2 treat3) 

probit religious2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg401.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 

probit wash2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg401.tex, append ctitle(5)  dec(3) keep(treat2 treat3) 

probit avoid_physical2 treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg401.tex, append ctitle(6)  dec(3) keep(treat2 treat3) 


//Panel B: BANGLADESH (without 'old' controls)
//Import data file: Data_Covid_BD_wave_1.dta
probit market2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg402.tex, append ctitle(1)  dec(3) keep(treat2 treat3) 

probit doctor2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg402.tex, append ctitle(2)  dec(3) keep(treat2 treat3) 

probit entertainment2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg402.tex, append ctitle(3)  dec(3) keep(treat2 treat3) 

probit religious2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg402.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 

probit wash2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg402.tex, append ctitle(5)  dec(3) keep(treat2 treat3) 

probit avoid_physical2 treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID) asis
outreg2 using reg402.tex, append ctitle(6)  dec(3) keep(treat2 treat3) 

clear

//Panel C: INDIA
//Import data file: Data_Covid_India.dta
probit market3 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location) asis
outreg2 using reg403.tex, append ctitle(1) dec(3)  keep(treat2 treat3)

probit doctor3 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location) asis
outreg2 using reg403.tex, append ctitle(2) dec(3)  keep(treat2 treat3)

probit entertainment2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location) asis
outreg2 using reg403.tex, append ctitle(3) dec(3)  keep(treat2 treat3)

probit religious2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation, vce(cluster location) asis
outreg2 using reg403.tex, append ctitle(4) dec(3)  keep(treat2 treat3)

probit wash_practice2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location) asis
outreg2 using reg403.tex, append ctitle(5) dec(3)  keep(treat2 treat3)

probit hands_practice2 treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location) asis
outreg2 using reg403.tex, append ctitle(6) dec(3)  keep(treat2 treat3)

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B16: Effects on compliance: robustness check with revised index

//After importing each data, we need to generate a new compliance index using hand washing and avoiding contact responses only.

//Columns 1-3 (A: Bangladesh Endline 1)
//Import data file: Data_Covid_BD_wave_1.dta

//Run the following regressions to generate Columns 1-3 as in Table B16
reg compidx_robust treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg_robust1.tex, append ctitle(1)  dec(3) keep(treat2 treat3) 
//F-test p-values (T2-T3)
test treat2=treat3 

reg compidx_robust treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg_robust1.tex, append ctitle(2)  dec(3) keep(treat2 treat3)
//F-test p-values (T2-T3)
test treat2=treat3 

reg compidx_robust treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE if Gender_res==0, vce(cluster VILLAGE_ID)
outreg2 using reg_robust1.tex, append ctitle(3)  dec(3) keep(treat2 treat3)
//F-test p-values (T2-T3)
test treat2=treat3 

//Randomization Inference p-values
randcmd ((treat2 treat3) reg compidx_robust treat2 treat3 Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg compidx_robust treat2 treat3 age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg compidx_robust treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE if Gender_res==0, vce(cluster VILLAGE_ID)), treatvars(treat2 treat3) seed(1234) reps(1000)

clear

//Column 4 (B: Bangladesh Endline 2)
//Import data file: Data_Covid_BD_wave_2.dta

//Run the following regression to generate Column 4 as in Table B16
reg compidx_robust_w2 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.food_sec2 media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg_robust1.tex, append ctitle(4)  dec(3) keep(treat2 treat3) 
//F-test p-values (T2-T3)
test treat2=treat3 

//Randomization Inference p-values
randcmd ((treat2 treat3) reg compidx_robust_w2 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.food_sec2 media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)), treatvars(treat2 treat3) seed(1234) reps(1000)

clear

//Column 5 (C: India)
//Import data file: Data_Covid_India.dta

//Run the following regression to generate Column 5 as in Table B16
reg compidx_robust treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg_robust1.tex, append ctitle(5) dec(3)  keep(treat2 treat3)
//F-test p-values (T2-T3)
test treat2=treat3 
//CGM p-values
boottest treat2, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234) 
boottest treat3, boottype(wild) bootcluster(location) statistic(t) reps(1000) seed(1234)

//Randomization Inference p-values
randcmd ((treat2 treat3) reg compidx_robust treat2 treat3 age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)), treatvars(treat2 treat3) seed(1234) reps(1000)

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B17: Correlation between awareness (scale 0-5) and compliance indicators

//Panel A: BANGLADESH (with all controls)
//Import data file: Data_Covid_BD_wave_1.dta
reg market2 tot_ans age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg901.tex, append ctitle(1)  dec(3) keep(tot_ans)

reg doctor2 tot_ans age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg901.tex, append ctitle(2)  dec(3) keep(tot_ans)

reg entertainment2 tot_ans age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg901.tex, append ctitle(3)  dec(3) keep(tot_ans) 

reg religious2 tot_ans age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg901.tex, append ctitle(4)  dec(3) keep(tot_ans) 

reg wash2 tot_ans age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg901.tex, append ctitle(5)  dec(3) keep(tot_ans) 

reg avoid_physical2 tot_ans age_respondent edu_respondent Gender_res rel_islam log_income nmember i.occupation i.insec media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg901.tex, append ctitle(6)  dec(3) keep(tot_ans) 


//Panel B: BANGLADESH (without 'old' controls)
//Import data file: Data_Covid_BD_wave_1.dta
reg market2 tot_ans Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg902.tex, append ctitle(1)  dec(3) keep(tot_ans) 

reg doctor2 tot_ans Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg902.tex, append ctitle(2)  dec(3) keep(tot_ans) 

reg entertainment2 tot_ans Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg902.tex, append ctitle(3)  dec(3) keep(tot_ans) 

reg religious2 tot_ans Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg902.tex, append ctitle(4)  dec(3) keep(tot_ans) 

reg wash2 tot_ans Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg902.tex, append ctitle(5)  dec(3) keep(tot_ans) 

reg avoid_physical2 tot_ans Gender_res rel_islam i.occupation i.insec health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg902.tex, append ctitle(6)  dec(3) keep(tot_ans)  

clear

//Panel C: INDIA
//Import data file: Data_Covid_India.dta
reg market3 total_ans age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg903.tex, append ctitle(1) dec(3) keep(total_ans)

reg doctor3 total_ans age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg903.tex, append ctitle(2) dec(3) keep(total_ans)

reg entertainment2 total_ans age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg903.tex, append ctitle(3) dec(3) keep(total_ans)

reg religious2 total_ans age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg903.tex, append ctitle(4) dec(3) keep(total_ans)

reg wash_practice2 total_ans age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg903.tex, append ctitle(5) dec(3) keep(total_ans)

reg hands_practice2 total_ans age male hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using reg903.tex, append ctitle(6) dec(3) keep(total_ans)

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B18: Effects on compliance in India: social desirability bias checks
//Import data file: Data_attrition_India.dta

//Generate "high SDB score" dummy using the SDB score variable
gen sds_high=1 if sds_score>5 & followed==1
replace sds_high=0 if sds_high==. & followed==1
label variable sds_high "=1 if SDB score is above median and 0 otherwise"

*Generate treatment dummies from treatment categorial variable
gen treat1=1 if treat_a==1
replace treat1=0 if treat1==.
label variable treat1 "Text only"

gen treat2=1 if treat_a==2
replace treat2=0 if treat2==.
label variable treat2 "Call only"

gen treat3=1 if treat_a==3
replace treat3=0 if treat3==.
label variable treat3 "Both text and call"

//Generate interactions
gen sdstreat2=sds_score*treat2
gen sdstreat3=sds_score*treat3
gen sdsd_treat2=sds_high*treat2
gen sdsd_treat3=sds_high*treat3

//Generating new compliance index, so that control mean=0 and sd=1. This is required because SDB is not available for the full sample.
egen comply_sdb=rowtotal(market3 doctor3 entertainment2 religious2 wash_practice2 hands_practice2) if followed==1
replace comply_sdb=comply/6 if followed==1
label variable comply_sdb "Compliance index (between 0 and 1) for SDB"

egen comp_control=mean(comply_sdb) if treat==1
replace comp_control = comp_control[_n-1] if comp_control >= .
replace comp_control = comp_control[_n+1] if comp_control >= .

egen comp_con_stdv=sd(comply_sdb) if treat==1
replace comp_con_stdv = comp_con_stdv[_n-1] if comp_con_stdv >= .
replace comp_con_stdv = comp_con_stdv[_n+1] if comp_con_stdv >= .

gen compidx_sdb=((comply_sdb-comp_control)/comp_con_stdv)
label variable compidx_sdb "Compliance index (standardized) for SDB"

drop comp_control comp_con_stdv


//Run the following to generate estimates as in Columns 1-4, Table B18.
reg compidx_sdb treat2 treat3 male age hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location if sds_high==0, vce(cluster location)
outreg2 using sdb_robustness.tex, dec(3) ctitle(1) keep(treat2 treat3)

reg compidx_sdb treat2 treat3 male age hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location if sds_high==1, vce(cluster location)
outreg2 using sdb_robustness.tex, dec(3) ctitle(2) keep(treat2 treat3)

reg compidx_sdb treat2 treat3 sds_high sdsd_treat2 sdsd_treat3 male age hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using sdb_robustness.tex, dec(3) ctitle(3) keep(treat2 treat3 sds_high sdsd_treat2 sdsd_treat3)

reg compidx_sdb treat2 treat3 sds_score sdstreat2 sdstreat3 male age hindu i.caste2 log_inc college i.urban i.joint i.own_house disability married i.employed health_risk health_worry finance_worry insec i.long_term i.occupation i.location, vce(cluster location)
outreg2 using sdb_robustness.tex, dec(3) ctitle(4) keep(treat2 treat3 sds_score sdstreat2 sdstreat3)

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B19: Comparison between women from the first and second endline in Bangladesh

//Import the following data: BD_wave_1_2.dta 

//Column "Endline 1"
summ age_respondent edu_respondent Monthly_income nmember rel_islam farmer laborer selfemployed professional if endline==1 & Gender_res==0 //Recall that endline 2 only had females, so we compare only female respondents

//Column "Both Endlines"
summ age_respondent edu_respondent Monthly_income nmember rel_islam farmer laborer selfemployed professional if endline==2

//Column ""Difference"
local reg_var "age_respondent edu_respondent Monthly_income nmember rel_islam farmer laborer selfemployed professional"
foreach X of local reg_var{
	reg `X' i.endline if Gender_res==0, cl(VILLAGE_ID)
	outreg2 using Table_19_c3.xls, append ctitle(Variable-`X')
	}

clear
***************************************************************************************************


***************************************************************************************************
*TABLE B20: Effects on compliance indicators in Bangladesh: second endline
//Import data file: Data_Covid_BD_wave_2.dta
reg Q12_1 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg200.tex, append ctitle(1) dec(3) keep(treat2 treat3)

reg Q12_2 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg200.tex, append ctitle(2) dec(3) keep(treat2 treat3)

reg Q12_3 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg200.tex, append ctitle(3) dec(3) keep(treat2 treat3)

reg Q12_4 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg200.tex, append ctitle(4) dec(3) keep(treat2 treat3) 

reg Q12_5 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg200.tex, append ctitle(5) dec(3) keep(treat2 treat3) 

reg Q12_6 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg200.tex, append ctitle(6) dec(3) keep(treat2 treat3) 

reg Q12_7 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)
outreg2 using reg200.tex, append ctitle(7) dec(3) keep(treat2 treat3) 

//Westfall-Young p-values
wyoung Q12_1 Q12_2 Q12_3 Q12_4 Q12_5 Q12_6 Q12_7, cmd(reg OUTCOMEVAR treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) familyp(treat2 treat3) cluster(VILLAGE_ID) bootstrap(1000) seed(1234) //force

//Randomization Inference p-values
randcmd ((treat2 treat3) reg Q12_1 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg Q12_2 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg Q12_3 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg Q12_4 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg Q12_5 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg Q12_6 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)) ((treat2 treat3) reg Q12_7 treat2 treat3 age_respondent edu_respondent rel_islam log_income nmember i.occupation i.insec2 hhchore media_exp health_worry finance_worry i.UNION_CODE, vce(cluster VILLAGE_ID)), treatvars(treat2 treat3) seed(1234) reps(1000)

clear
***************************************************************************************************


***************************************************************************************************

*TABLES B21-B24: See the folder "4. Tables 5 and B21-24 ML Heterogeneity". Check the readme.txt file.
 
***************************************************************************************************


***************************************************************************************************
*FIGURE C1: Distributions of SDB score across treatments (Indian sample)
//Import data file: Data_attrition_India.dta

twoway (kdensity sds_score if treat==1, bwidth(1.5) xlabel(0(4)13) ylabel(0(0.05)0.2) clpattern(dash) clc(black)) ///
(kdensity sds_score if treat==2, bwidth(1.5) xlabel(0(4)13) ylabel(0(0.05)0.2) clpattern(solid) clc(black)) ///
(kdensity sds_score if treat==3, bwidth(1.5) xlabel(0(4)13) ylabel(0(0.05)0.2) clpattern(longdash) clc(black)), ///
ytitle("Density") xtitle("Social desirability score (between 0 and 13)") title("") graphregion(color(white)) legend( order(1 2 3) label(1 "SMS only") label(2 "Call only") label(3 "SMS & Call both")) saving(base_1, replace)

//Kolmogorov-Smirnov test and T-test p-values reported in Appendix C
ksmirnov sds_score, by(a)
ksmirnov sds_score, by(b)
ksmirnov sds_score, by(c)
ttest sds_score, by(a)
ttest sds_score, by(b)
ttest sds_score, by(c)

clear
***************************************************************************************************


***************************************************************************************************
*TABLE C1: Balance check: social desirability bias (Indian sample)
//Import data file: Data_attrition_India.dta

*Generate treatment groups that also includes 190 that were not surveyed
gen treat1=1 if treat_a==1
replace treat1=0 if treat1==.
label variable treat1 "Text only"

gen treat2=1 if treat_a==2
replace treat2=0 if treat2==.
label variable treat2 "Call only"

gen treat3=1 if treat_a==3
replace treat3=0 if treat3==.
label variable treat3 "Both text and call"

//Generate interactions
gen age_T2=age*treat2
gen college_T2=college*treat2
gen male_T2=male*treat2
gen urban_T2=urban*treat2
gen income_T2=income*treat2
gen joint_T2=joint*treat2 
gen own_house_T2=own_house*treat2 
gen disability_T2=disability*treat2 
gen married_T2=married*treat2 
gen employment_T2=employment*treat2 
gen long_term_T2=long_term*treat2 
gen hindu_T2=hindu*treat2 
gen caste_c1_T2=caste_c1*treat2 

gen age_T3=age*treat3
gen college_T3=college*treat3
gen male_T3=male*treat3
gen urban_T3=urban*treat3
gen income_T3=income*treat3
gen joint_T3=joint*treat3 
gen own_house_T3=own_house*treat3 
gen disability_T3=disability*treat3 
gen married_T3=married*treat3 
gen employment_T3=employment*treat3 
gen long_term_T3=long_term*treat3 
gen hindu_T3=hindu*treat3 
gen caste_c1_T3=caste_c1*treat3

//Column 1
reg followed age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat==1,vce(cluster location)
outreg2 using sdb_balance.tex, dec(3) ctitle(1)
//Joint F-test
test age college male urban income joint own_house disability married employment long_term hindu caste_c1

//Column 2
reg followed age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat==2,vce(cluster location)
outreg2 using sdb_balance.tex, dec(3) ctitle(2)
//Joint F-test
test age college male urban income joint own_house disability married employment long_term hindu caste_c1

//Column 3
reg followed age college male urban income joint own_house disability married employment long_term hindu caste_c1 if treat==3,vce(cluster location)
outreg2 using sdb_balance.tex, dec(3) ctitle(3)
//Joint F-test
test age college male urban income joint own_house disability married employment long_term hindu caste_c1

//Column 4
reg followed age college male urban income joint own_house disability married employment long_term hindu caste_c1 treat2 treat3 age_T2 age_T3 college_T2 college_T3 male_T2 male_T3 urban_T2 urban_T3 income_T2 income_T3 joint_T2 joint_T3 own_house_T2 own_house_T3 disability_T2 disability_T3 married_T2 married_T3 employment_T2 employment_T3 long_term_T2 long_term_T3 hindu_T2 hindu_T3 caste_c1_T2 caste_c1_T3 if treat!=.,vce(cluster location)
outreg2 using sdb_balance.tex, dec(3) ctitle(4)
//Joint F-test
test age college male urban income joint own_house disability married employment long_term hindu caste_c1
//Joint F-test on interactions
test age_T2 age_T3 college_T2 college_T3 male_T2 male_T3 urban_T2 urban_T3 income_T2 income_T3 joint_T2 joint_T3 own_house_T2 own_house_T3 disability_T2 disability_T3 married_T2 married_T3 employment_T2 employment_T3 long_term_T2 long_term_T3 hindu_T2 hindu_T3 caste_c1_T2 caste_c1_T3

clear
***************************************************************************************************



*******************************
* End of appendix replication *
*******************************
